@import './variables.scss';
@import './mixin.scss';
@import './transition.scss';
@import './element-ui.scss';
@import './sidebar.scss';

body {
  height: 100%;
  -moz-osx-font-smoothing: grayscale;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial, sans-serif;
}

label {
  font-weight: 700;
}

html {
  height: 100%;
  box-sizing: border-box;
}

#app {
  height: 100%;
}

*,
*:before,
*:after {
  box-sizing: inherit;
}

a:focus,
a:active {
  outline: none;
}

a,
a:focus,
a:hover {
  cursor: pointer;
  color: inherit;
  text-decoration: none;
}

div:focus {
  outline: none;
}

.clearfix {
  &:after {
    visibility: hidden;
    display: block;
    font-size: 0;
    content: " ";
    clear: both;
    height: 0;
  }
}

// main-container global css
.app-container {
  padding: 20px;
  // background-color: #45474a;
  width: 100vw;
  height: 100vh;
}

// 首页图表通用
/* .chart-container {
  width: 700px;
  margin: 10px;
  padding: 10px;
  display: inline-flex;
}

.chart {
  width: 700px;
  height: 400px;
  display: inline-flex; // 或者使用 inline-flex inline-block
  box-sizing: border-box;
}*/

.dashboard-editor-container {
  padding: 32px;
  background-color: $bg;
  position: relative;
  width: 100%;
  display: flex;
  // 确保子元素如果超出容器宽度则换行显示
  flex-wrap: wrap;
}

.chart-container {
  // 允许图表容器根据需要自动调整大小，以均匀填充可用空间
  flex: 1;
  margin: 0px 10px 10px 0;
}

@media (max-width: 600px) {
  .chart-container {
    flex-basis: 100%;
  }
}

.chart {
  width: 600px;
  height: 400px;
  // display: inline-flex; // 或者使用 inline-flex inline-block
  // box-sizing: border-box; // 内边距和边框的尺寸会被包含在这个 with 的范围内, 默认 content-box
}

.chart-container2 {
  width: 100%;
  flex-basis: 100%;
}
.chart2 {
  width: 100%;
  height: 400px;
}